home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-08-17 | 50.1 KB | 1,696 lines |
- [[ MPSS VERSION 1.4
- Hello Folks !
- Here is the, new, revised game. Hope it will go ok on your machine.
- Incase of any problems, mail me. This is Version 1.4. If you have
- a lower or unmarked version of this game, replace it by this. It's worth it.
- Some bugs are fixed. Re-read the rules file. Still BSD Unix dependent.]]
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: Patches01
- # Wrapped by billr@saab on Wed Aug 17 11:50:06 1988
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Patches01' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Patches01'\"
- else
- echo shar: Extracting \"'Patches01'\" \(48433 characters\)
- sed "s/^X//" >'Patches01' <<'END_OF_FILE'
- X*** ../../mpss/aliens.c Thu Jun 23 10:22:05 1988
- X--- aliens.c Wed Jul 27 14:36:06 1988
- X***************
- X*** 1,3 ****
- X--- 1,18 ----
- X+
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X+ /*******************************************************************************
- X+ ********************************************************************************
- X+ ********************************************************************************
- X+
- X+ PERMISSION TO COPY THIS SOFTWARE IS HEREBY GIVEN BY THE AUTHOR PROVIDED THAT
- X+ THIS LEADING MESSAGE IS INCLUDED IN ALL OF THE RELEVANT SOURCE FILES.
- X+
- X+ P. SCHMITZ, UNIVERSITY OF KEELE, MAY 1988.
- X+
- X+
- X+ ********************************************************************************
- X+ ********************************************************************************
- X+ *******************************************************************************/
- X #include "ships.h"
- X #include "header.h"
- X
- X***************
- X*** 89,96 ****
- X i=rand()%100;
- X if (i<6)
- X {
- X! fire_torpedo(cp,'6',0);
- X cp->messindex=0;
- X i=rand()%100;
- X if (i<50)
- X cp->yvel=1;
- X--- 104,117 ----
- X i=rand()%100;
- X if (i<6)
- X {
- X! if (cp->planets[1]!=0)
- X! {
- X! fire_torpedo(cp,'9',0);
- X! fire_torpedo(cp,'9',0);
- X! } else
- X! fire_torpedo(cp,'6',0);
- X cp->messindex=0;
- X+ cp->planets[1]=0;
- X i=rand()%100;
- X if (i<50)
- X cp->yvel=1;
- X***************
- X*** 100,107 ****
- X i=rand()%100;
- X if (i<6)
- X {
- X! fire_torpedo(cp,'4',0);
- X cp->messindex=0;
- X i=rand()%100;
- X if (i<50)
- X {
- X--- 121,134 ----
- X i=rand()%100;
- X if (i<6)
- X {
- X! if (cp->planets[1]!=0)
- X! {
- X! fire_torpedo(cp,'7',0);
- X! fire_torpedo(cp,'7',0);
- X! } else
- X! fire_torpedo(cp,'4',0);
- X cp->messindex=0;
- X+ cp->planets[1]=0;
- X i=rand()%100;
- X if (i<50)
- X {
- X***************
- X*** 140,146 ****
- X register struct player *x;
- X if (noofplayers>1) return(0);
- X x=startlist;
- X! while (x!=NULL && x->id!=enemyid) x=x->next;
- X if (x!=NULL) lockonalien(x,who);
- X }
- X
- X--- 167,173 ----
- X register struct player *x;
- X if (noofplayers>1) return(0);
- X x=startlist;
- X! while (x!=NULL && (x->id!=enemyid || x->messindex==1)) x=x->next;
- X if (x!=NULL) lockonalien(x,who);
- X }
- X
- X***************
- X*** 153,158 ****
- X--- 180,195 ----
- X
- X i=rand()%1000;
- X if (i>500) cp->weaponselect=0; else cp->weaponselect=1;
- X+ if (i>500)
- X+ {
- X+ if (i>750) cp->screenenergy=6; else cp->screenenergy=7;
- X+ } else
- X+ {
- X+ if (i>250) cp->screenenergy=5; else cp->screenenergy=8;
- X+ }
- X+ i=rand()%100;
- X+ if (i>30) cp->planets[1]=0; else
- X+ cp->planets[1]=abs((rand()%10)-5);
- X if (who==NULL)
- X {
- X x=startlist;
- X***************
- X*** 180,201 ****
- X autopilotalien(cp)
- X register struct player *cp;
- X {
- X if (cp->weaponselect==0)
- X {
- X! if (cp->xpos!=(cp->channel[1].enemy->xpos-7))
- X {
- X! if (cp->xpos<(cp->channel[1].enemy->xpos-7)) cp->xvel=1; else cp->xvel= -1;
- X } else cp->xvel=0;
- X } else
- X {
- X! if (cp->xpos!=(cp->channel[1].enemy->xpos+6))
- X {
- X! if (cp->xpos<(cp->channel[1].enemy->xpos+6)) cp->xvel=1; else cp->xvel= -1;
- X } else cp->xvel=0;
- X }
- X! if (cp->ypos!=cp->channel[1].enemy->ypos)
- X {
- X! if (cp->ypos<cp->channel[1].enemy->ypos) cp->yvel=1; else cp->yvel= -1;
- X } else cp->yvel=0;
- X
- X /* arrival at location*/
- X--- 217,240 ----
- X autopilotalien(cp)
- X register struct player *cp;
- X {
- X+ int g;
- X+ g = cp->planets[1];
- X if (cp->weaponselect==0)
- X {
- X! if (cp->xpos!=(cp->channel[1].enemy->xpos-cp->screenenergy))
- X {
- X! if (cp->xpos<(cp->channel[1].enemy->xpos-cp->screenenergy)) cp->xvel=1; else cp->xvel= -1;
- X } else cp->xvel=0;
- X } else
- X {
- X! if (cp->xpos!=(cp->channel[1].enemy->xpos+cp->screenenergy))
- X {
- X! if (cp->xpos<(cp->channel[1].enemy->xpos+cp->screenenergy)) cp->xvel=1; else cp->xvel= -1;
- X } else cp->xvel=0;
- X }
- X! if (cp->ypos!=(cp->channel[1].enemy->ypos-g))
- X {
- X! if (cp->ypos<(cp->channel[1].enemy->ypos-g)) cp->yvel=1; else cp->yvel= -1;
- X } else cp->yvel=0;
- X
- X /* arrival at location*/
- X*** ../../mpss/auto.c Thu Jun 23 10:22:05 1988
- X--- auto.c Wed Jul 27 14:36:06 1988
- X***************
- X*** 1,3 ****
- X--- 1,5 ----
- X+
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X*** ../../mpss/collision.c Thu Jun 23 10:22:05 1988
- X--- collision.c Wed Jul 27 14:36:06 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 14,19 ****
- X--- 15,36 ----
- X *******************************************************************************/
- X #include "header.h"
- X
- X+ bounceplayer(cp)
- X+ register struct player *cp;
- X+ {
- X+ if (cp->xvel<0) cp->xvel=1;
- X+ else
- X+ {
- X+ if (cp->xvel>0) cp->xvel= -1;
- X+ }
- X+ if (cp->yvel<0) cp->yvel=1;
- X+ else
- X+ {
- X+ if (cp->yvel>0) cp->yvel= -1;
- X+ }
- X+ plotvelocity(cp);
- X+ }
- X+
- X collision(cp,c)
- X register struct player *cp;
- X char c;
- X***************
- X*** 35,55 ****
- X }
- X case 'O' :
- X {
- X! plot1(cp," You crashed into a planet. Oh dear, Oh dear, ");
- X! plot2(cp," The crater you left was 12 miles wide. Your'e Dead! ");
- X! if (cp->reason>0) cp->reason= -1;
- X! finish(cp);
- X break;
- X }
- X case '.' :
- X {
- X- cp->maxenergy -= 30;
- X- cp->energy -= 30;
- X- plotenergy(cp);
- X- plotmaxenergy(cp);
- X plot1(cp," You collided with a star. Warp capability has been ");
- X plot2(cp," reduced by 30, and your energy is 30 lower now. ");
- X! if (cp->stat!=5) plotstatus(cp,4);
- X break;
- X }
- X case 'k' :
- X--- 52,86 ----
- X }
- X case 'O' :
- X {
- X! plot1(cp,"You struck the planet. The crater you left was 24 miles ");
- X! plot2(cp,"wide. You lost 499 energy units. WARNING : ENERGY LOW!! ");
- X! cp->energy -= 499;
- X! cp->maxenergy -= 499;
- X! plotbattleenergy(cp);
- X! bounceplayer(cp);
- X! if (cp->energy<0 && cp->reason>0)
- X! {
- X! cp->reason= -1;
- X! finish(cp);
- X! }
- X break;
- X }
- X case '.' :
- X {
- X plot1(cp," You collided with a star. Warp capability has been ");
- X plot2(cp," reduced by 30, and your energy is 30 lower now. ");
- X! cp->maxenergy -= 30;
- X! cp->energy -= 30;
- X! plotbattleenergy(cp);
- X! bounceplayer(cp);
- X! if (cp->energy<0 && cp->reason>0)
- X! {
- X! cp->reason= -6;
- X! finish(cp);
- X! } else
- X! {
- X! if (cp->stat!=5) plotstatus(cp,4);
- X! }
- X break;
- X }
- X case 'k' :
- X***************
- X*** 56,66 ****
- X {
- X cp->maxenergy -= 100;
- X cp->energy -= 100;
- X- plotenergy(cp);
- X- plotmaxenergy(cp);
- X plot1(cp," You collided with a klingon mevisic mine... ");
- X plot2(cp," Energy and Maxenergy have dropped by 100. ");
- X! if (cp->stat!=5) plotstatus(cp,4);
- X break;
- X }
- X case '#' :
- X--- 87,104 ----
- X {
- X cp->maxenergy -= 100;
- X cp->energy -= 100;
- X plot1(cp," You collided with a klingon mevisic mine... ");
- X plot2(cp," Energy and Maxenergy have dropped by 100. ");
- X! plotbattleenergy(cp);
- X! bounceplayer(cp);
- X! if (cp->energy<0 && cp->reason>0)
- X! {
- X! cp->reason= -8;
- X! finish(cp);
- X! } else
- X! {
- X! if (cp->stat!=5) plotstatus(cp,4);
- X! }
- X break;
- X }
- X case '#' :
- X***************
- X*** 67,77 ****
- X {
- X cp->maxenergy -= 400;
- X cp->energy -= 400;
- X- plotenergy(cp);
- X- plotmaxenergy(cp);
- X plot1(cp," You collided with a Romulan Warning buoy. ");
- X plot2(cp," Energy and Maxenergy have dropped by 400. ");
- X! if (cp->stat!=5) plotstatus(cp,4);
- X break;
- X }
- X case 'o' :
- X--- 105,122 ----
- X {
- X cp->maxenergy -= 400;
- X cp->energy -= 400;
- X plot1(cp," You collided with a Romulan Warning buoy. ");
- X plot2(cp," Energy and Maxenergy have dropped by 400. ");
- X! plotbattleenergy(cp);
- X! bounceplayer(cp);
- X! if (cp->energy<0 && cp->reason>0)
- X! {
- X! cp->reason= -7;
- X! finish(cp);
- X! } else
- X! {
- X! if (cp->stat!=5) plotstatus(cp,4);
- X! }
- X break;
- X }
- X case 'o' :
- X*** ../../mpss/consoleplots.c Thu Jun 23 10:22:05 1988
- X--- consoleplots.c Wed Jul 27 14:36:06 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 108,113 ****
- X--- 109,115 ----
- X char energy[5];
- X
- X if ((cp->id==ROMID)||(cp->id==KLINGID)) return(0);
- X+ cp->screenenergy=cp->energy;
- X if (cp->energy>0)
- X {
- X sprintf(energy," %4d",cp->energy);
- X***************
- X*** 131,136 ****
- X--- 133,139 ----
- X char energy[5];
- X
- X if ((d->id==ROMID)||(d->id==KLINGID)) return(0);
- X+ d->screenenergy=d->energy;
- X sprintf(energy," %4d",d->energy);
- X poscurs(d,14,7);
- X write(d->fd,energy,5);
- X*** ../../mpss/cross.c Thu Jun 23 10:22:05 1988
- X--- cross.c Wed Jul 27 14:36:07 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 164,170 ****
- X poscurs(cp,20,7);
- X write(cp->fd, "d,f => dock/undock, 1..9 => fire weapon, p => weapon sel.",57);
- X poscurs(cp,20,8);
- X! write(cp->fd, " q => show quadrant, w => show warp, e => show energy ",57);
- X poscurs(cp,20,9);
- X write(cp->fd, " c => cloaking device on/off, v => shields on/off ",57);
- X poscurs(cp,20,10);
- X--- 165,171 ----
- X poscurs(cp,20,7);
- X write(cp->fd, "d,f => dock/undock, 1..9 => fire weapon, p => weapon sel.",57);
- X poscurs(cp,20,8);
- X! write(cp->fd, " q => show exact quadrant, e => show exact energy ",57);
- X poscurs(cp,20,9);
- X write(cp->fd, " c => cloaking device on/off, v => shields on/off ",57);
- X poscurs(cp,20,10);
- X*** ../../mpss/cursor.c Thu Jun 23 10:22:06 1988
- X--- cursor.c Wed Jul 27 14:36:07 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 44,50 ****
- X return(0);
- X break;
- X case 1 :
- X! fprintf(stderr," Found entry for automatic terminal option\n");
- X break;
- X default:
- X fprintf(stderr,"get_termcap_entry:Somethings wrong!!\n");
- X--- 45,51 ----
- X return(0);
- X break;
- X case 1 :
- X! fprintf(stderr," Found entry for automatic terminal option\n");
- X break;
- X default:
- X fprintf(stderr,"get_termcap_entry:Somethings wrong!!\n");
- X*** ../../mpss/dock.c Thu Jun 23 10:22:06 1988
- X--- dock.c Wed Jul 27 14:36:07 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 27,33 ****
- X dockingok=ON;
- X if (dockingok==OFF)
- X {
- X! plot1(cp," Your'e not beside a federation starbase Captain. ");
- X plot2(cp," ");
- X } else
- X {
- X--- 28,34 ----
- X dockingok=ON;
- X if (dockingok==OFF)
- X {
- X! plot1(cp," Your'e not beside any starbase or spacedock Captain. ");
- X plot2(cp," ");
- X } else
- X {
- X*** ../../mpss/keyscan.c Thu Jun 23 10:22:06 1988
- X--- keyscan.c Wed Jul 27 14:36:07 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X*** ../../mpss/main.c Thu Jun 23 10:22:06 1988
- X--- main.c Wed Jul 27 14:36:07 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 16,21 ****
- X--- 17,40 ----
- X #include "files.h"
- X #include "header.h"
- X
- X+ lognewprocess(procno)
- X+ int procno;
- X+ {
- X+ FILE *f, *fopen();
- X+ char arr[15];
- X+
- X+ if ((f=fopen(PROCESSFILE,"a"))==NULL)
- X+ {
- X+ fprintf(stdout,"slave.c : error trying to log processnumber\n");
- X+ die();
- X+ } else
- X+ {
- X+ sprintf(arr,"%d\n",procno);
- X+ fputs(arr,f);
- X+ fclose(f);
- X+ }
- X+ }
- X+
- X checkmasterpidfile()
- X {
- X int rpid,masterpid;
- X***************
- X*** 40,46 ****
- X die();
- X }
- X signal(SIGALRM,checkmasterpidfile);
- X! alarm(180);
- X }
- X
- X
- X--- 59,65 ----
- X die();
- X }
- X signal(SIGALRM,checkmasterpidfile);
- X! alarm(60);
- X }
- X
- X
- X***************
- X*** 80,91 ****
- X main()
- X {
- X register struct player *cp;
- X! int f,o;
- X register int x,y,x1,x2,y1,y2,xx1,xx2,yy1,yy2,xold,yold,xnew,ynew;
- X register char c;
- X register struct torpedo *torpedo;
- X! register int xx,test;
- X
- X test=1;
- X f=umask(000);
- X killcontrol();
- X--- 99,111 ----
- X main()
- X {
- X register struct player *cp;
- X! int sener,ener,f,o;
- X register int x,y,x1,x2,y1,y2,xx1,xx2,yy1,yy2,xold,yold,xnew,ynew;
- X register char c;
- X register struct torpedo *torpedo;
- X! register int loop,xx,test;
- X
- X+ lognewprocess(getpid());
- X test=1;
- X f=umask(000);
- X killcontrol();
- X***************
- X*** 124,129 ****
- X--- 144,167 ----
- X goto goonlabel;
- X }
- X cp->clflg=OFF;
- X+
- X+
- X+
- X+ /**********************TUNING DELAY LOOP FOR SINGLE-PLAYER-MODE****************/
- X+ /*
- X+ Alter the number (10) below. Increase it to slow down the game, decrease it
- X+ to speed it up, or delete the loop as a whole if your machine runs mpss to
- X+ slowly in single player mode.
- X+
- X+ This number > v
- X+ v
- X+ v
- X+ if (noofplayers==1) for (loop=1; loop < 10; loop++);
- X+ */
- X+ /**********************TUNING DELAY LOOP FOR SINGLE-PLAYER-MODE****************/
- X+
- X+
- X+
- X ioctl(cp->fd,FIONREAD,&noofchars);
- X if (noofchars>0) processinput(cp,&noofchars);
- X if ((cp->stat==5)&&(cp->flyto>=0)&&(cp->flyto<4)) auto_pilot(cp);
- X***************
- X*** 273,282 ****
- X
- X if ((x<58)||(x>899)||(y<19)||(y>899))
- X {
- X! if (x<58) cp->xvel=1;
- X! if (x>899) cp->xvel= -1;
- X! if (y<19) cp->yvel=1;
- X! if (y>899) cp->yvel= -1;
- X } else
- X {
- X if ((c=inuniv(x,y))!=NULL) collision(cp,c);
- X--- 311,336 ----
- X
- X if ((x<58)||(x>899)||(y<19)||(y>899))
- X {
- X! if (x<58)
- X! {
- X! cp->xvel=1;
- X! plotvelocity(cp);
- X! }
- X! if (x>899)
- X! {
- X! cp->xvel= -1;
- X! plotvelocity(cp);
- X! }
- X! if (y<19)
- X! {
- X! cp->yvel=1;
- X! plotvelocity(cp);
- X! }
- X! if (y>899)
- X! {
- X! cp->yvel= -1;
- X! plotvelocity(cp);
- X! }
- X } else
- X {
- X if ((c=inuniv(x,y))!=NULL) collision(cp,c);
- X***************
- X*** 342,349 ****
- X
- X skipenergy:
- X
- X! if ((cp->energy==75)&&(storm==OFF)) flare();
- X! if (cp->energy<100) plotenergy(cp);
- X /*ENERGY CALCULATION*/
- X goonlabel:
- X if (cp->impulsemove>0) {
- X--- 396,410 ----
- X
- X skipenergy:
- X
- X! ener=cp->energy;
- X! sener=cp->screenenergy;
- X!
- X! if ((ener==75)&&(storm==OFF)) flare();
- X! if (ener!=sener)
- X! {
- X! if ((ener<=100) || (((ener%50)==0)) || (ener==cp->maxenergy))
- X! plotenergy(cp);
- X! }
- X /*ENERGY CALCULATION*/
- X goonlabel:
- X if (cp->impulsemove>0) {
- X*** ../../mpss/mpss.c Thu Jun 23 10:22:06 1988
- X--- mpss.c Wed Jul 27 14:36:08 1988
- X***************
- X*** 1,4 ****
- X--- 1,18 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X+ /*******************************************************************************
- X+ ********************************************************************************
- X+ ********************************************************************************
- X+
- X+ PERMISSION TO COPY THIS SOFTWARE IS HEREBY GIVEN BY THE AUTHOR PROVIDED THAT
- X+ THIS LEADING MESSAGE IS INCLUDED IN ALL OF THE RELEVANT SOURCE FILES.
- X+
- X+ P. SCHMITZ, UNIVERSITY OF KEELE, MAY 1988.
- X+
- X+
- X+ ********************************************************************************
- X+ ********************************************************************************
- X+ *******************************************************************************/
- X #include <stdio.h>
- X #include "files.h"
- X
- X*** ../../mpss/mpssclean.c Thu Jun 23 10:22:06 1988
- X--- mpssclean.c Wed Jul 27 14:36:08 1988
- X***************
- X*** 1,3 ****
- X--- 1,18 ----
- X+
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X+ /*******************************************************************************
- X+ ********************************************************************************
- X+ ********************************************************************************
- X+
- X+ PERMISSION TO COPY THIS SOFTWARE IS HEREBY GIVEN BY THE AUTHOR PROVIDED THAT
- X+ THIS LEADING MESSAGE IS INCLUDED IN ALL OF THE RELEVANT SOURCE FILES.
- X+
- X+ P. SCHMITZ, UNIVERSITY OF KEELE, MAY 1988.
- X+
- X+
- X+ ********************************************************************************
- X+ ********************************************************************************
- X+ *******************************************************************************/
- X #include <stdio.h>
- X #include "files.h"
- X #include <signal.h>
- X***************
- X*** 5,14 ****
- X
- X main()
- X {
- X! int rpid;
- X char string[15];
- X char remove[80];
- X FILE *f, *fopen();
- X
- X sprintf(remove,"rm %s\n",PLAYERFILE);
- X system(remove);
- X--- 20,36 ----
- X
- X main()
- X {
- X! int rpid,procno;
- X char string[15];
- X char remove[80];
- X+ char arr[15];
- X FILE *f, *fopen();
- X+
- X+ fprintf(stdout," MPSS CLEANUP PROGRAM..\n");
- X+ fprintf(stdout," This program quits any game currently running,\n");
- X+ fprintf(stdout," and/or it cleans up files and processes left \n");
- X+ fprintf(stdout,"on your system incase MPSS was stopped abnormally.\n");
- X+ fprintf(stdout," Please ignore any error messages below. \n\n");
- X
- X sprintf(remove,"rm %s\n",PLAYERFILE);
- X system(remove);
- X***************
- X*** 26,30 ****
- X--- 48,69 ----
- X fclose(f);
- X }
- X sprintf(remove,"rm %s\n",MASTERPIDFILE);
- X+ system(remove);
- X+
- X+ if ((f=fopen(PROCESSFILE,"r"))==NULL)
- X+ {
- X+ fprintf(stdout,"mpssclean : processnumber file not existent.\n");
- X+ exit(0);
- X+ } else
- X+ {
- X+ while ((fgets(arr,15,f))!=NULL)
- X+ {
- X+ sscanf(arr,"%d\n",&procno);
- X+ kill(procno,9);
- X+ fprintf(stdout,"mpssclean : killed process number : %d\n",procno);
- X+ }
- X+ fclose(f);
- X+ }
- X+ sprintf(remove,"rm %s\n",PROCESSFILE);
- X system(remove);
- X }
- X*** ../../mpss/newplayer.c Thu Jun 23 10:22:06 1988
- X--- newplayer.c Wed Jul 27 14:36:08 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X*** ../../mpss/orbit.c Thu Jun 23 10:22:07 1988
- X--- orbit.c Wed Jul 27 14:36:08 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 113,120 ****
- X plot2(cp,"Most of our energy has been used to keep us in the air. ");
- X cp->energy -= 300;
- X cp->maxenergy -= 300;
- X! plotenergy(cp);
- X! plotmaxenergy(cp);
- X return(0);
- X }
- X
- X--- 114,125 ----
- X plot2(cp,"Most of our energy has been used to keep us in the air. ");
- X cp->energy -= 300;
- X cp->maxenergy -= 300;
- X! plotbattleenergy(cp);
- X! if (cp->energy<0 && cp->reason>0)
- X! {
- X! cp->reason= -12;
- X! finish(cp);
- X! }
- X return(0);
- X }
- X
- X*** ../../mpss/planets.c Thu Jun 23 10:22:07 1988
- X--- planets.c Wed Jul 27 14:36:09 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 19,31 ****
- X {
- X 0,220,670,
- X " Spock : We are now orbiting earth sir. ",
- X! " *************** ",
- X! " ******** ********* ",
- X! " * Starfleet Command * ",
- X! " *United Federation of Planets* ",
- X! " * Starfleet Headquarters * ",
- X! " ******** ********* ",
- X! " *************** ",
- X "Admiral Nogouchi : Welcome to Starfleet Command Kirk. ",
- X "Your mission will last for 5 years flying around the ",
- X "Galaxy to explore new life whereever you can. While you ",
- X--- 20,32 ----
- X {
- X 0,220,670,
- X " Spock : We are now orbiting earth sir. ",
- X! " ********************** ",
- X! " ***** ***** ",
- X! " *** Starfleet Command *** ",
- X! " *****United Federation of Planets***** ",
- X! " *** Starfleet Headquarters *** ",
- X! " ***** ***** ",
- X! " ********************** ",
- X "Admiral Nogouchi : Welcome to Starfleet Command Kirk. ",
- X "Your mission will last for 5 years flying around the ",
- X "Galaxy to explore new life whereever you can. While you ",
- X***************
- X*** 80,86 ****
- X "Effect : You are now a Jedi. / ",
- X " This is your new weapon--> / ",
- X " /_/ ",
- X! 3,400,675,
- X "Spock : This is Ceti Alpha 6. Where we left Khan marooned",
- X "You are standing on the planet but Khan and his crew are ",
- X "nowhere to be found. However you do find a dilithium ",
- X--- 81,87 ----
- X "Effect : You are now a Jedi. / ",
- X " This is your new weapon--> / ",
- X " /_/ ",
- X! 3,400,676,
- X "Spock : This is Ceti Alpha 6. Where we left Khan marooned",
- X "You are standing on the planet but Khan and his crew are ",
- X "nowhere to be found. However you do find a dilithium ",
- X***************
- X*** 374,380 ****
- X "%%%%%%%%%%%%%% . || : ",
- X "%%%%%%%%%%%%% -- ",
- X "%%%%%%%%%%%% ",
- X! 17,300,225,
- X "Spock : We are now orbiting the remote ice-world of Hoth.",
- X "You arrive and ar in for a bad shock. Its freeeezing here",
- X "and you decide to find shelter in a local cave. There you",
- X--- 375,381 ----
- X "%%%%%%%%%%%%%% . || : ",
- X "%%%%%%%%%%%%% -- ",
- X "%%%%%%%%%%%% ",
- X! 17,300,226,
- X "Spock : We are now orbiting the remote ice-world of Hoth.",
- X "You arrive and ar in for a bad shock. Its freeeezing here",
- X "and you decide to find shelter in a local cave. There you",
- X***************
- X*** 584,590 ****
- X " ",
- X " ",
- X " ",
- X! 27,675,410,
- X "Spock : We are now orbiting the klingon planet Kharse II.",
- X " You find a vast computer complex and enter. You are ",
- X "surrounded by machines, lights and basically feel pretty ",
- X--- 585,591 ----
- X " ",
- X " ",
- X " ",
- X! 27,676,410,
- X "Spock : We are now orbiting the klingon planet Kharse II.",
- X " You find a vast computer complex and enter. You are ",
- X "surrounded by machines, lights and basically feel pretty ",
- X*** ../../mpss/processinput.c Fri Jul 15 09:51:28 1988
- X--- processinput.c Wed Jul 27 14:36:09 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 22,28 ****
- X {
- X register struct player *x,*o;
- X int z;
- X! unsigned char c; /* override "char c" in header.h -- br */
- X
- X getbuf(cp,ptrnoofchars);
- X while ((c=getchr(cp))!='\0')
- X--- 23,29 ----
- X {
- X register struct player *x,*o;
- X int z;
- X! unsigned char c;
- X
- X getbuf(cp,ptrnoofchars);
- X while ((c=getchr(cp))!='\0')
- X***************
- X*** 530,537 ****
- X cp->message[i]=' ';
- X cp->messindex=0;
- X break;
- X- case 'w': plotvelocity(cp);
- X- break;
- X case 'e': plotenergy(cp);
- X break;
- X case 'd': if (cp->stat!=7) dock(cp);
- X--- 531,536 ----
- X***************
- X*** 592,598 ****
- X impulse_message(cp)
- X register struct player *cp;
- X {
- X- plotvelocity(cp);
- X plot1(cp," Manoevering Impulse Thrusters only function from ");
- X plot2(cp," a stationary position..thrusters are overheated. ");
- X }
- X--- 591,596 ----
- X***************
- X*** 614,622 ****
- X if (abs(cp->xvel)>cp->maxvel)
- X {
- X if (cp->xvel<0) ++(cp->xvel); else --(cp->xvel);
- X! } else
- X {
- X if (cp->yvel<0) ++(cp->yvel); else --(cp->yvel);
- X }
- X! }
- X }
- X--- 612,621 ----
- X if (abs(cp->xvel)>cp->maxvel)
- X {
- X if (cp->xvel<0) ++(cp->xvel); else --(cp->xvel);
- X! }
- X! if (abs(cp->yvel)>cp->maxvel)
- X {
- X if (cp->yvel<0) ++(cp->yvel); else --(cp->yvel);
- X }
- X! } else plotvelocity(cp);
- X }
- X*** ../../mpss/scan.c Thu Jun 23 10:22:08 1988
- X--- scan.c Wed Jul 27 14:36:09 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X*** ../../mpss/setupuniverse.c Thu Jun 23 10:22:08 1988
- X--- setupuniverse.c Wed Jul 27 14:36:09 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X*** ../../mpss/ships.c Thu Jun 23 10:22:08 1988
- X--- ships.c Wed Jul 27 14:36:09 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X*** ../../mpss/slave.c Thu Jun 23 10:22:08 1988
- X--- slave.c Wed Jul 27 14:36:10 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 45,50 ****
- X--- 46,94 ----
- X char name[10];
- X int score;
- X } sb[50];
- X+
- X+ lognewprocess(procno)
- X+ int procno;
- X+ {
- X+ char arr[15];
- X+
- X+ if ((f=fopen(PROCESSFILE,"a"))==NULL)
- X+ {
- X+ fprintf(stdout,"slave.c : error trying to log processnumber\n");
- X+ abnormdie();
- X+ } else
- X+ {
- X+ sprintf(arr,"%d\n",procno);
- X+ fputs(arr,f);
- X+ fclose(f);
- X+ }
- X+ }
- X+
- X+ checkmasterpidfile()
- X+ {
- X+ int rpid;
- X+ char string[15];
- X+ FILE *ff,*fopen();
- X+
- X+ if ((ff=fopen(MASTERPIDFILE,"r"))==NULL)
- X+ {
- X+ fprintf(stdout,"slave.c: Can't read masterpidfile\n");
- X+ abnormdie();
- X+ } else
- X+ {
- X+ fgets(string,15,ff); /*get pid*/
- X+ fclose(ff);
- X+ }
- X+ sscanf(string,"%d\n",&rpid);
- X+ if (rpid!=masterpid)
- X+ {
- X+ fprintf(stdout,"slave.c: pids not equal!!! %d %d\n",rpid,masterpid);
- X+ abnormdie();
- X+ }
- X+ signal(SIGALRM,checkmasterpidfile);
- X+ /*fprintf(stdout,"slave.c : checked masterpid. its OK!!\n");*/
- X+ alarm(20);
- X+ }
- X
- X readinscores()
- X {
- X***************
- X*** 63,70 ****
- X } else
- X {
- X sleep(3);
- X! clrscreenslave(cl,tty_type);
- X! fprintf(stdout,"Two games were created at once. Please try again. That should work.\n");
- X return(0);
- X }
- X
- X--- 107,116 ----
- X } else
- X {
- X sleep(3);
- X! fprintf(stdout,"Either the program aborted abnormally or two games were created at the same time.\n");
- X! fprintf(stdout,"If two games were created at once. Please try again. That should work.\n");
- X! fprintf(stdout,"(This is likely if you & someone else startred a game at the same instant) \n");
- X! fprintf(stdout,"If nobody else is playing and you keep getting this message, do an mpssclean!\n");
- X return(0);
- X }
- X
- X***************
- X*** 91,97 ****
- X
- X if (i>=50)
- X {
- X! fprintf(stdout,"\nYou did so badly, that you didn't even make the scoreboard!\n");
- X unlink(PLAYERSCOREFILE);
- X return(0);
- X }
- X--- 137,143 ----
- X
- X if (i>=50)
- X {
- X! fprintf(stdout,"\n You did so badly, that you didn't even make the scoreboard!\n");
- X unlink(PLAYERSCOREFILE);
- X return(0);
- X }
- X***************
- X*** 142,148 ****
- X fprintf(stdout,"\n");
- X tputs(bon,1,slaveoutc);
- X fprintf(stdout,"*****************************************************************************\n");
- X! fprintf(stdout,"* MULTI-PLAYER-STAR-TREK's ALL TIME HIGHS *\n");
- X fprintf(stdout,"*****************************************************************************\n");
- X tputs(boff,1,slaveoutc);
- X fprintf(stdout,"*Position Name Ships name Cause of Death Score *\n");
- X--- 188,194 ----
- X fprintf(stdout,"\n");
- X tputs(bon,1,slaveoutc);
- X fprintf(stdout,"*****************************************************************************\n");
- X! fprintf(stdout,"* MULTI-PLAYER-STAR-TREK's ALL TIME HIGHS (V 1.4) *\n");
- X fprintf(stdout,"*****************************************************************************\n");
- X tputs(boff,1,slaveoutc);
- X fprintf(stdout,"*Position Name Ships name Cause of Death Score *\n");
- X***************
- X*** 178,184 ****
- X write(0,"Ran out of energy in flight!!",29);
- X break;
- X case -3:
- X! write(0,"activated Selfdestruct & quit",29);
- X break;
- X case -4:
- X write(0,"Blew up under heavy attack...",29);
- X--- 224,230 ----
- X write(0,"Ran out of energy in flight!!",29);
- X break;
- X case -3:
- X! write(0,"Self-destructed the ship/quit",29);
- X break;
- X case -4:
- X write(0,"Blew up under heavy attack...",29);
- X***************
- X*** 186,191 ****
- X--- 232,258 ----
- X case -5:
- X write(0,"Tried time warping twice.....",29);
- X break;
- X+ case -6:
- X+ write(0,"Flew into a star.............",29);
- X+ break;
- X+ case -7:
- X+ write(0,"Struck a Romulan warning buoy",29);
- X+ break;
- X+ case -8:
- X+ write(0,"Hit a Klingon mevisic mine...",29);
- X+ break;
- X+ case -9:
- X+ write(0,"Shot by a Klingon destroyer..",29);
- X+ break;
- X+ case -10:
- X+ write(0,"Shot by a Romulan cruiser....",29);
- X+ break;
- X+ case -11:
- X+ write(0,"Was hit by flying ship debris",29);
- X+ break;
- X+ case -12:
- X+ write(0,"Fried in a planets atmosphere",29);
- X+ break;
- X default:
- X write(0,"Burnt up over Genesis........",29);
- X break;
- X***************
- X*** 208,214 ****
- X exit(0);
- X }
- X
- X!
- X /*
- X * setrawmode() Function to set cbreak -echo for the terminal
- X */
- X--- 275,287 ----
- X exit(0);
- X }
- X
- X! abnormdie()
- X! {
- X! fprintf(stdout,"abnormal termination of program, try mpssclean.\n");
- X! unsetrawmode();
- X! exit(0);
- X! }
- X!
- X /*
- X * setrawmode() Function to set cbreak -echo for the terminal
- X */
- X***************
- X*** 288,294 ****
- X fprintf(stderr,"Try again without the -t option. If you get the same result,\n");
- X fprintf(stderr,"you must modify the code. (See rules)\n");
- X }
- X! exit(0);
- X }
- X } else
- X {
- X--- 361,367 ----
- X fprintf(stderr,"Try again without the -t option. If you get the same result,\n");
- X fprintf(stderr,"you must modify the code. (See rules)\n");
- X }
- X! abnormdie();
- X }
- X } else
- X {
- X***************
- X*** 305,310 ****
- X--- 378,385 ----
- X int childpid,i;
- X char *s;
- X char c;
- X+
- X+ lognewprocess(getpid());
- X nointro=0; termcap=0;
- X while(--argc>0 && (*++argv)[0]=='-')
- X for (s=argv[0]+1; *s!='\0'; s++)
- X***************
- X*** 335,370 ****
- X }
- X setrawmode();
- X
- X srand(time()%10);
- X sleep(rand()%10);
- X
- X! while ((f=fopen(LOCK,"r"))!=NULL)
- X {
- X fclose(f);
- X! fprintf(stdout," Your'e in the queue to join. Please wait..\n");
- X! sleep(rand()%10);
- X }
- X
- X if ((i=creat(LOCK,0666))<0)
- X fprintf(stdout," Cant create LOCK file.\n");
- X
- X statflg=OFF;
- X /*CHECK IF THE MASTER IS ALREADY RUNNING!!!*/
- X if ((f=fopen(MASTERPIDFILE,"r"))==NULL)
- X {
- X /*tell others the game is starting......*/
- X char run[80];
- X sprintf(run,"%s",MAILFILE);
- X system(run);
- X /*tell others the game is starting......*/
- X- clrscreenslave(cl,tty_type);
- X
- X fprintf(stdout," Invoking the game for the first player....\n");
- X fprintf(stdout," This takes about 30 seconds...............\n");
- X if ((pid=fork())==0) {
- X execl(MASTERPROGRAM,"peer",">&!/dev/null","&",(char *) 0);
- X fprintf(stderr,"cannot invoke master process!");
- X! exit();
- X }
- X statflg=ON;
- X i=0;
- X--- 410,472 ----
- X }
- X setrawmode();
- X
- X+ fprintf(stdout," Please wait..this can take a moment. \n");
- X srand(time()%10);
- X sleep(rand()%10);
- X
- X! i=1;
- X! while ((i<8)&&(f=fopen(LOCK,"r"))!=NULL)
- X {
- X+ fprintf(stdout," %d) Please keep waiting (timeout at 10).\n",i);
- X fclose(f);
- X! sleep(3+rand()%10);
- X! i++;
- X }
- X+
- X+ if (i==8)
- X+ {
- X+ unlink(LOCK);
- X+ i=0;
- X+ while ((i<6)&&(f=fopen(LOCK,"r"))!=NULL)
- X+ {
- X+ fclose(f);
- X+ fprintf(stdout," Your'e still in the queue to join. Please be patient a little more...\n");
- X+ sleep(2+rand()%10);
- X+ i++;
- X+ }
- X+ if (i==6)
- X+ {
- X+ fprintf(stdout,"Can't get LOCKfile to open. Try 'mpssclean' first.\n");
- X+ abnormdie();
- X+ }
- X+ }
- X+
- X
- X if ((i=creat(LOCK,0666))<0)
- X+ {
- X fprintf(stdout," Cant create LOCK file.\n");
- X+ abnormdie();
- X+ }
- X
- X statflg=OFF;
- X /*CHECK IF THE MASTER IS ALREADY RUNNING!!!*/
- X if ((f=fopen(MASTERPIDFILE,"r"))==NULL)
- X {
- X+
- X /*tell others the game is starting......*/
- X char run[80];
- X sprintf(run,"%s",MAILFILE);
- X system(run);
- X /*tell others the game is starting......*/
- X
- X+
- X+ clrscreenslave(cl,tty_type);
- X fprintf(stdout," Invoking the game for the first player....\n");
- X fprintf(stdout," This takes about 30 seconds...............\n");
- X if ((pid=fork())==0) {
- X execl(MASTERPROGRAM,"peer",">&!/dev/null","&",(char *) 0);
- X fprintf(stderr,"cannot invoke master process!");
- X! abnormdie();
- X }
- X statflg=ON;
- X i=0;
- X***************
- X*** 375,383 ****
- X i++;
- X }
- X if (i==20) {
- X! fprintf(stdout," mpss : timed out waiting.\n");
- X unlink(LOCK);
- X! exit(0);
- X }
- X }
- X fgets(masterpidname,15,f);
- X--- 477,485 ----
- X i++;
- X }
- X if (i==20) {
- X! fprintf(stdout," mpss : timed out waiting. Do mpssclean!\n");
- X unlink(LOCK);
- X! abnormdie();
- X }
- X }
- X fgets(masterpidname,15,f);
- X***************
- X*** 425,430 ****
- X--- 527,533 ----
- X sleep(4);
- X fprintf(stdout," before.....\n");
- X sleep(3);
- X+ clrscreenslave(cl,tty_type);
- X poscursslave(cm,tty_type,0,0);
- X fprintf(stdout,"\n");
- X fprintf(stdout,"\n");
- X***************
- X*** 448,474 ****
- X fprintf(stdout," * *\n");
- X fprintf(stdout," * Written by Peer Schmitz, University of Keele, Keele, Staffs, *\n");
- X fprintf(stdout," * ST5-5BG, Jan. - Jul 88, due to a lack of STAR TREK on the box.*\n");
- X! fprintf(stdout," * Version 1.3.... *\n");
- X fprintf(stdout," *****************************************************************\n");
- X! tputs(bon,1,slaveoutc);
- X! fprintf(stdout,"\n Hit any key\n");
- X! tputs(boff,1,slaveoutc);
- X! read(0,&c,1);
- X nextlabel:
- X if ((pid=fork())==0)
- X {
- X childpid=getpid();
- X! while ((f=fopen(PLAYERFILE,"r"))!=NULL)
- X {
- X fclose(f);
- X! sleep(((int)(time()%10)));
- X }
- X /*Now we know the file isnt there yet*/
- X i=creat(PLAYERFILE,0666);
- X if ((f=fopen(PLAYERFILE,"w"))==NULL)
- X {
- X fprintf(stdout,"CANNOT OPEN PLAYERFILE\n");
- X! exit(0);
- X } else
- X {
- X char c;
- X--- 551,601 ----
- X fprintf(stdout," * *\n");
- X fprintf(stdout," * Written by Peer Schmitz, University of Keele, Keele, Staffs, *\n");
- X fprintf(stdout," * ST5-5BG, Jan. - Jul 88, due to a lack of STAR TREK on the box.*\n");
- X! fprintf(stdout," * Version 1.4.... *\n");
- X fprintf(stdout," *****************************************************************\n");
- X! sleep(17);
- X! clrscreenslave(cl,tty_type);
- X nextlabel:
- X if ((pid=fork())==0)
- X {
- X+ signal(SIGALRM,checkmasterpidfile);
- X childpid=getpid();
- X! lognewprocess(childpid);
- X! i=1;
- X! while ((i<5)&&((f=fopen(PLAYERFILE,"r"))!=NULL))
- X {
- X fclose(f);
- X! fprintf(stdout," %d) Please be patient a little more...\n",i);
- X! sleep((2+(rand()%10)));
- X! i++;
- X }
- X+
- X+ if (i==5)
- X+ {
- X+ unlink(PLAYERFILE);
- X+ i=1;
- X+ while ((i<6)&&(f=fopen(PLAYERFILE,"r"))!=NULL)
- X+ {
- X+ fclose(f);
- X+ fprintf(stdout," %d) Please be patient a little more...\n",i);
- X+ fprintf(stdout," Hang in there a little more...\n");
- X+ fprintf(stdout," (Ill time out soon if this fails.)\n");
- X+ sleep(2+rand()%10);
- X+ i++;
- X+ }
- X+ if (i==6)
- X+ {
- X+ fprintf(stdout,"Can't get Playerfile to open. Try 'mpssclean' first.\n");
- X+ abnormdie();
- X+ }
- X+ }
- X+
- X /*Now we know the file isnt there yet*/
- X i=creat(PLAYERFILE,0666);
- X if ((f=fopen(PLAYERFILE,"w"))==NULL)
- X {
- X fprintf(stdout,"CANNOT OPEN PLAYERFILE\n");
- X! abnormdie();
- X } else
- X {
- X char c;
- X***************
- X*** 484,489 ****
- X--- 611,617 ----
- X */
- X clrscreenslave(cl,tty_type);
- X kill(masterpid,29);
- X+ alarm(20);
- X while(1);
- X }
- X }
- X*** ../../mpss/torpedo.c Thu Jun 23 10:22:08 1988
- X--- torpedo.c Wed Jul 27 14:36:10 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 16,22 ****
- X
- X move_torpedos()
- X {
- X! int x,y;
- X int hit;
- X struct torpedo *t,*a;
- X struct player *p,*h;
- X--- 17,23 ----
- X
- X move_torpedos()
- X {
- X! int x,y,ll;
- X int hit;
- X struct torpedo *t,*a;
- X struct player *p,*h;
- X***************
- X*** 67,72 ****
- X--- 68,83 ----
- X {
- X plot1(t->whofrom," Direct hit on enemy Captain! Well Done! ");
- X plot2(t->whofrom," ");
- X+ if (h->id==ROMID)
- X+ {
- X+ h->photonpower +=10;
- X+ h->phaserpower +=5;
- X+ }
- X+ if (h->id==KLINGID)
- X+ {
- X+ h->photonpower +=5;
- X+ h->phaserpower +=2;
- X+ }
- X }
- X t->whofrom->score += 10;
- X plotscore(t->whofrom);
- X***************
- X*** 87,95 ****
- X--- 98,128 ----
- X if (t->whofrom->ypos == h->ypos)
- X {
- X if (t->whofrom->xpos < h->xpos)
- X+ {
- X+ if (i<75)
- X fire_torpedo(h,'4',0);
- X+ else
- X+ {
- X+ fire_torpedo(h,'4',0);
- X+ fire_torpedo(h,'1',0);
- X+ fire_torpedo(h,'7',0);
- X+ }
- X+ }
- X else
- X+ if (i<75)
- X fire_torpedo(h,'6',0);
- X+ else
- X+ {
- X+ fire_torpedo(h,'6',0);
- X+ fire_torpedo(h,'9',0);
- X+ fire_torpedo(h,'3',0);
- X+ if (i>85)
- X+ {
- X+ fire_torpedo(h,'2',0);
- X+ fire_torpedo(h,'8',0);
- X+ fire_torpedo(h,'6',0);
- X+ }
- X+ }
- X } else
- X {
- X if (t->whofrom->ypos < h->ypos)
- X***************
- X*** 150,156 ****
- X {
- X plot1(h," You have been blown out of the sky!!! ");
- X plot2(h," Shame the force wasn't with you this time. ");
- X! if (h->reason>0) h->reason= -4;
- X finish(h);
- X t->whofrom->score += 100;
- X plot1(t->whofrom," Chekov : Got him!! Bones : He's dead Jim! ");
- X--- 183,193 ----
- X {
- X plot1(h," You have been blown out of the sky!!! ");
- X plot2(h," Shame the force wasn't with you this time. ");
- X! if (t->whofrom->id!=ROMID
- X! && t->whofrom->id!=KLINGID
- X! && h->reason>0) h->reason= -4;
- X! if (t->whofrom->id==ROMID && h->reason>0) h->reason= -10;
- X! if (t->whofrom->id==KLINGID && h->reason>0) h->reason= -9;
- X finish(h);
- X t->whofrom->score += 100;
- X plot1(t->whofrom," Chekov : Got him!! Bones : He's dead Jim! ");
- X***************
- X*** 172,180 ****
- X {
- X plot1(h," You were hit by a piece of debris from the explosion! ");
- X plot2(h," Your energy capability has been lowered. ");
- X! h->energy-=10;
- X! h->maxenergy-=10;
- X plotbattleenergy(h);
- X }
- X } else /*hit is off!*/
- X {
- X--- 209,222 ----
- X {
- X plot1(h," You were hit by a piece of debris from the explosion! ");
- X plot2(h," Your energy capability has been lowered. ");
- X! h->energy-=30;
- X! h->maxenergy-=30;
- X plotbattleenergy(h);
- X+ if (h->energy<0 && h->reason>0)
- X+ {
- X+ h->reason= -11;
- X+ finish(h);
- X+ }
- X }
- X } else /*hit is off!*/
- X {
- X***************
- X*** 186,197 ****
- X if (t->whofrom!=NULL)
- X {
- X j=which_sector(t->xpos,t->ypos,0,0);
- X! if (j==2) gethim(t->whofrom,KLINGID);
- X! if (j==3) gethim(t->whofrom,ROMID);
- X! if (j==4) {
- X! gethim(t->whofrom,ROMID);
- X! gethim(t->whofrom,KLINGID);
- X! }
- X }
- X if (c=='*')
- X {
- X--- 228,254 ----
- X if (t->whofrom!=NULL)
- X {
- X j=which_sector(t->xpos,t->ypos,0,0);
- X! if (j==2 && t->whofrom->id!=ROMID && t->whofrom->id!=KLINGID)
- X! {
- X! gethim(t->whofrom,KLINGID);
- X! gethim(t->whofrom,KLINGID);
- X! gethim(t->whofrom,KLINGID);
- X! gethim(t->whofrom,KLINGID);
- X! }
- X! if (j==3 && t->whofrom->id!=ROMID && t->whofrom->id!=KLINGID)
- X! {
- X! gethim(t->whofrom,ROMID);
- X! gethim(t->whofrom,ROMID);
- X! gethim(t->whofrom,ROMID);
- X! gethim(t->whofrom,ROMID);
- X! }
- X! if (j==4 && t->whofrom->id!=ROMID && t->whofrom->id!=KLINGID)
- X! {
- X! for (ll=1;ll<MAXALIENS;ll++)
- X! gethim(t->whofrom,ROMID);
- X! for (ll=1;ll<MAXALIENS;ll++)
- X! gethim(t->whofrom,KLINGID);
- X! }
- X }
- X if (c=='*')
- X {
- X*** ../../mpss/files.h Thu Jun 23 10:22:09 1988
- X--- files.h Wed Jul 27 14:36:10 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 13,19 ****
- X ********************************************************************************
- X *******************************************************************************/
- X
- X-
- X #define SLAVEPROGRAM "/usr/games/mpsslib/slave"
- X #define MASTERPROGRAM "/usr/games/mpsslib/startrek"
- X
- X--- 14,19 ----
- X***************
- X*** 24,27 ****
- X--- 24,28 ----
- X #define SCOREFILE "/usr/games/mpsslib/score"
- X #define PLAYERSCOREFILE "/usr/games/mpsslib/playerscore"
- X #define MAILFILE "/usr/games/mpsslib/mpssmail"
- X+ #define PROCESSFILE "/tmp/processnos"
- X
- X*** ../../mpss/header.h Thu Jun 23 10:22:09 1988
- X--- header.h Wed Jul 27 14:36:10 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X***************
- X*** 22,28 ****
- X #define STARTENERGY 500
- X #define STARTPHASER 15
- X #define STARTPHOTON 10
- X! #define WEAPONREACH 6
- X #define PHOTONPOWER 60
- X #define PHASERPOWER 40
- X #define MAXWARP 1
- X--- 23,29 ----
- X #define STARTENERGY 500
- X #define STARTPHASER 15
- X #define STARTPHOTON 10
- X! #define WEAPONREACH 8
- X #define PHOTONPOWER 60
- X #define PHASERPOWER 40
- X #define MAXWARP 1
- X***************
- X*** 31,37 ****
- X #define OFF 0
- X #define ROMID 'R'
- X #define KLINGID 'K'
- X! #define MAXALIENS 3
- X
- X
- X struct sgttyb params;
- X--- 32,38 ----
- X #define OFF 0
- X #define ROMID 'R'
- X #define KLINGID 'K'
- X! #define MAXALIENS 6
- X
- X
- X struct sgttyb params;
- X***************
- X*** 100,105 ****
- X--- 101,107 ----
- X int xvel;
- X int yvel;
- X int maxvel;
- X+ int screenenergy;
- X int energy;
- X int maxenergy;
- X int cloakingdevice;
- X*** ../../mpss/planets.h Thu Jun 23 10:22:09 1988
- X--- planets.h Wed Jul 27 14:36:10 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- X*** ../../mpss/ships.h Thu Jun 23 10:22:09 1988
- X--- ships.h Wed Jul 27 14:36:10 1988
- X***************
- X*** 1,4 ****
- X--- 1,5 ----
- X
- X+ /********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
- X /*******************************************************************************
- X ********************************************************************************
- X ********************************************************************************
- END_OF_FILE
- if test 48433 -ne `wc -c <'Patches01'`; then
- echo shar: \"'Patches01'\" unpacked with wrong size!
- fi
- # end of 'Patches01'
- fi
- echo shar: End of shell archive.
- exit 0
-